ci: remove PR title check comment when check passes#172
Open
nielspardon wants to merge 1 commit into
Open
Conversation
Previously the PR Title Check workflow posted an "ACTION NEEDED" comment when the PR title/description did not follow Conventional Commits, but never removed it once the title was fixed. Consolidate the comment logic into a single github-script step that branches on the commitlint outcome (using continue-on-error plus core.setFailed to keep the check red on failure). On pass, delete any previously posted comment; on fail, post the comment if not already present. The bot comment is identified via a hidden <!-- pr-title-check --> marker so cleanup survives wording or whitespace changes. Declare pull-requests: write so the workflow can delete comments. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
|
looks good, but just wondering.. what's the point of the comment in the first place? isn't red check in checks section enough? |
Member
Author
We have this across most repositories and I'm only trying to improve it for now. I think the message is meant to give a slightly better explanation than the commitlint failure messages of the check. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports substrait-io/substrait-java#850 to substrait-python.
Previously the PR Title Check workflow posted an "ACTION NEEDED" comment when the PR
title/description did not follow Conventional Commits, but never removed it once the title was
fixed.
This consolidates the comment logic into a single
github-scriptstep that branches on thecommitlint outcome (using
continue-on-error: truepluscore.setFailed(...)to keep the checkred on failure):
The bot comment is identified via a hidden
<!-- pr-title-check -->marker rather than exact bodymatching, so cleanup survives wording or whitespace changes. The workflow now declares
permissions: pull-requests: writeso it can delete comments.The Python-specific
.commitlintrc.jscontent (the dependabotBumps [...]ignore rule) ispreserved.
Note: cleanup is marker-based, so it only applies to comments posted by this new version going
forward. Pre-existing comments from the old workflow version won't be automatically removed.